package com.mxpio.erp.common.technology.entity;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Table;

import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@IdClass(value = ItemPropKey.class)
@Table(name = "MB_ERP_INVENTORY_ITEM_PURCHASE_PROP")
@Schema(description="物料采购属性")
public class ItemPurchaseProp extends BaseEntity {
	
	private static final long serialVersionUID = 1L;
	
	@Id
	@Column(name = "PROP_TYPE_")
	@Schema(description = "属性类别")
	private String propType;
	
	@Id
	@Column(name = "CODE_")
	@Schema(description = "物料/物料组编码")
	private String code;
	
	@Column(name = "CLOSE_TOLERANCE_")
	@Schema(description = "关闭允差")
	private BigDecimal closeTolerance;
	
	@Column(name = "SUPPLY_MANAGER_")
	@Schema(description = "供应链管理")
	@Dict(dicCode = "ERP_COMMON_YESNO")
	private String supplyManager;
	
	@Column(name = "OUTSOURCING_")
	@Schema(description = "外协加工物料")
	@Dict(dicCode = "ERP_COMMON_YESNO")
	private String outsourcing;
}
